<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <th:block th:include="common :: header"/>
    <style>
        .container > div {
            margin: 100px auto;
        }

    </style>
</head>

<body>
<div class="container">
    <div>
        <form id="editForm" action="/config" method="post" th:object="${dbconfig}">
            <div class="form-group row">
                <label for="driverClassName" class="col-sm-3 col-form-label">数据库驱动</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control only" id="driverClassName" name="driverClassName" readonly="readonly" th:value="*{driverClassName}?:''">
                </div>
            </div>
            <div class="form-group row">
                <label for="url" class="col-sm-3 col-form-label">数据库地址</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="url" name="url" readonly="readonly" th:value="*{url}?:''">
                </div>
            </div>
            <div class="form-group row">
                <label for="dbname" class="col-sm-3 col-form-label">数据库名</label>
                <div class="col-sm-8">
                    <select class="form-control" id="dbname" name="dbname">
                        <option value="test" th:field="*{dbname}">test</option>
                        <option value="test2" th:field="*{dbname}">test2</option>
                    </select>
                </div>
            </div>
            <div class="form-group row">
                <label for="username" class="col-sm-3 col-form-label">用户名</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="username" name="username" readonly="readonly" th:value="*{username}?:''">
                </div>
            </div>
            <div class="form-group row">
                <label for="password" class="col-sm-3 col-form-label">密码</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="password" name="password" readonly="readonly" th:value="*{password}?:''">
                </div>
            </div>
            <br>
            <div class="btn-submit-wrapper" style="text-align:center">
                <button id="submitButton" type="submit" class="btn btn-primary btn-submit col-3">修改</button>
            </div>
        </form>
    </div>

    <div class="list">
        <table class="table">
            <thead class="thead-dark">
            <tr>
                <th scope="col">ID</th>
                <th scope="col">姓名</th>
                <th scope="col">地址</th>
                <th scope="col">手机</th>
            </tr>
            </thead>
            <tbody>
            <tr th:object="${resume}" th:each="resume:${resumes}">
                <td th:text="*{id}"></td>
                <td th:text="*{name}"></td>
                <td th:text="*{address}"></td>
                <td th:text="*{phone}"></td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
</div>

</body>
</html>